package xyz.xtt.common.exception;

import java.io.Serial;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 通通链操作异常类
 *
 * @author huqibo
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class ChainException extends NftException {
	@Serial
	private static final long serialVersionUID = 1L;
	private int code;
	private String msg;

	public ChainException(BaseMessage errorMessage) {
		super(errorMessage.getCode(), errorMessage.getMessage());
		this.code = errorMessage.getCode();
		this.msg = errorMessage.getMessage();
	}

	public ChainException(int code, String msg) {
		super(code, msg);
		this.code = code;
		this.msg = msg;
	}

}
